﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Security;
namespace KGE
{
    class WindowsAPI
    {       
        #region Windows API
        /// <summary>
        /// 获取时间的精度
        /// </summary>
        /// <param name="PerformanceFrequency"></param>
        /// <returns></returns>
        [SuppressUnmanagedCodeSecurity]
        [DllImport("kernel32")]
        public static extern bool QueryPerformanceFrequency(ref long PerformanceFrequency);
        /// <summary>
        /// 获取时间计数
        /// </summary>
        /// <param name="PerformanceCount"></param>
        /// <returns></returns>
        [SuppressUnmanagedCodeSecurity]
        [DllImport("kernel32")]
        public static extern bool QueryPerformanceCounter(ref long PerformanceCount);
        #endregion
    }
}
